#include <iostream>
#include <cmath>
using namespace std;

int main()
{
    double a = 0;
    char b = 0;
    cin >> a >> b;
    int ret = 0;
    if (a <= 1)
    {
        ret += 20;
    }
    else
    {
        ret += 20;
        a -= 1;
        ret += ceil(a);
    }

    if (b == 'y')
    {
        ret += 5;
    }
    cout << ret << endl;
    return 0;
}